package com.example.courseorder.student;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student {
    @NotBlank(message = "请输入你的名字")
    private String name;
    @Size(min = 10,max = 10,message = "学号长度必须为10")
    private String sno;
    @NotBlank(message = "请输入你的年级，如18级")
    private String grade;
    @NotBlank(message = "请输入你的专业")
    private String department;
    @NotBlank(message = "请输入你的学院")
    private String academy;
    @Size(min = 1,message = "至少选择一门课程")
    private List<Course> course;
}
